
import util from '../../../common/js/util'
import NProgress from 'nprogress'
import axios from 'axios';
import address from "../../../../models/dict/address.js"  //任务字典模块
import moment from 'moment'

import task from "../../../../models/dict/task.js"  //任务字典模块
import array from "../../../../models/comm/array.js"  //数组操作模块
import yz from "../../../../models/comm/yz.js"  //数组操作模块
import Vue from 'vue'

import math from 'mathjs';

import clType from '../../../../models/dict/clothesSizeType'




export default {
    data() {
        return {



            unitArray: task.unitArray(),

            listLoading: false,
            amount: 0,
            sewDoneNum: 0,
            num: 0,
            sectionDoneNum: 0



        }
    },
    methods: {


        getSizeName(sizeId) {
            return clType.getSizeName(sizeId)
        },
        count() {
            this.sectionDoneNum = 0;
            this.num = 0;
            this.sewDoneNum = 0;

            this.currObj.detail.forEach(function (item) {
                this.sewDoneNum = math.chain(this.sewDoneNum).add(item.sewDoneNum).done()

                this.sectionDoneNum = math.chain(this.sectionDoneNum).add(item.sectionDoneNum).done()
                this.num = math.chain(this.num).add(item.num).done()
            }, this);



        }





    },
    mounted() {
        this.count()
    },
    props: {
        currObj: {

        }



    }
}